Skip to content

Fixed a bug with AndAny, a case of uint16 overflow#474

Merged
lemire merged 1 commit intoRoaringBitmap:masterfrom
dzairi:master
May 19, 2025
Merged

Fixed a bug with AndAny, a case of uint16 overflow#474
lemire merged 1 commit intoRoaringBitmap:masterfrom
dzairi:master

Conversation

@dzairi
Copy link
Copy Markdown

@dzairi dzairi commented May 19, 2025

When AndAny is used with bitmaps that are using runcontainers that contain a range [x,65535], the resetTo arrayContainer panic with 'panic: runtime error: index out of range [length] with length [length]'.

This is because the loop in line 'arraycontainer.go#L969' val is a uint16 and will overflow and will never be > r.last() as r.last() is MaxUint16.

@lemire lemire merged commit fb67118 into RoaringBitmap:master May 19, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants